package com.bachelor.community.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.sql.Timestamp;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Accessors(chain = true)
public class Question {

    @TableId(type = IdType.AUTO)
    private Long id;
    private String title;
    private String content;
    private Integer creator;

    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    @TableField(fill = FieldFill.UPDATE)
    private Timestamp updateTime;

    private Integer answerCount;
    private Integer viewCount;
    private Integer score;

    @TableField(value = "is_top")
    private Boolean top;
    @TableField(value = "is_essential")
    private Boolean essential;
    @TableField(value = "is_solved")
    private Boolean solved;
    private Integer reward;
    private String executionResult;
    private String errorMessage;
    private String completeCode;
    private String errorCode;
    private String errorRow;
    private String errorColumn;
    private Integer state;
}
